export type PDFSource = { url: string } | { data: ArrayBuffer | Uint8Array }

export interface ViewerOptions {
  container: HTMLElement
  initialScale?: number
  minScale?: number
  maxScale?: number
  overscan?: number
}

export interface PageContainerRefs {
  wrapper: HTMLElement
  canvas?: HTMLCanvasElement | null
  textLayer?: HTMLDivElement | null
}

export interface PageMetrics {
  width: number
  height: number
  scale: number
}

export interface PageState {
  index: number
  rendered: boolean
  metrics?: PageMetrics
}

export interface PDFPlugin {
  init(viewer: unknown): void
}

export interface VisibleRange {
  start: number
  end: number
}
